package com.mall.controller;

import com.mall.pojo.UmsMemberLevel;
import com.mall.service.UmsMemberLevelService;
import com.mall.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("memberLevel")
public class UmsMemberLevelController {

    @Autowired
    private UmsMemberLevelService umsMemberLevelService;

    //查询所有会员等级
    @GetMapping("/list")
    public Result<List<UmsMemberLevel>> list(@RequestParam("defaultStatus") Integer defaultStatus) {
        List<UmsMemberLevel> list = umsMemberLevelService.list(defaultStatus);
        return Result.success(list, "操作成功");
    }

}
